package com.taiji.dicom4cloud.smart.rfid.config;

import com.taiji.dicom4cloud.smart.rfid.mqtt.MqttConfig;
import org.springframework.core.annotation.Order;
import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

@Order
@Component
@MessagingGateway(defaultRequestChannel = MqttConfig.CHANNEL_NAME_OUT)
public interface MqttGatewayService {

    void send2Mqtt(@Header(MqttHeaders.TOPIC) String topic, String payload);

    void send2Mqtt(@Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS) int qos, String payload);
}
